package com.qf58.search.model.service;


import com.qf58.search.exception.APIException;
import com.qf58.search.page.BoolPager;

/**
 * Created with IntelliJ IDEA.
 * Description: 文章索引
 * User: zhubo
 * Date: 2017-08-29
 * Time: 19:37
 */
public interface ArticleService {

    /**
     * 插入json字符串
     * @param jsonStr  {"labelIds":[1,2,3],"readNum":23,"articleCategoryId":"aaaaaaaaaaaaaaaa","id":1231231313123123}
     * @return 返回插入ID
     * @throws APIException
     */
    public String insertIndex(String jsonStr) throws APIException;

    /**
     * 查询接口
     * @param uriStr 查询字符串:  "pageNo=1&pageSize=10&labelIds=1|2|4&articleCategoryId=asdf33242ss&sort=readNum_asc,id_desc"
     * @return
     * @throws APIException
     */
    public BoolPager searchIndex(String uriStr) throws APIException;


    /**
     * 根据ID更新索引信息
     * @param uriStr
     * @param id
     * @return
     * @throws APIException
     */
    public boolean updateIndex(String uriStr,Long id) throws APIException;



}
